package com.gs.api.project.video.web;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.gs.api.core.Result;
import com.gs.api.project.video.entity.BzNotice;
import com.gs.api.project.video.service.IBzNoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.Resource;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 小程序公告表 前端控制器
 * </p>
 *
 * @author guoshao
 * @since 2022-03-19
 */
@RestController
@RequestMapping("{appid}/notice")
public class BzNoticeController {


    @Autowired
    private IBzNoticeService iBzNoticeService;

    @RequestMapping(value = "getNotice")
    public Result getNotice() {

        BzNotice notice = iBzNoticeService.getOne(new QueryWrapper<BzNotice>().orderByDesc("create_Time").last("limit 1"));
        

        return Result.success(notice);
    }

}
